Avoid Loading FAP Files

For maximum performance, you want to avoid loading FAP files whenever possible. While there may be some FAP files you have to load, make sure you keep them to a minimum. There are several ways to avoid loading FAP files, such as by...

Turn off the LoadCordFAP option

By default, the GenData program will load FAP files. If the LoadCordFAP option is turned on, the GenData program will load all FAP files. Avoid turning on this INI option as it will negatively affect performance. For example, make sure this option is set as follows:

< RunMode >
LoadCordFAP = No

The GenData program should only write information about dynamic data, such as variables, into NA file from DDT files. You can more efficiently do this by loading the DDT files instead of the FAP files.

There are, however, situations which require you to load FAP files. The CheckImageLoaded and TextMergeParagraph rules were included in the base system for these situations. These rules let you load data for a single FAP file. You’ll find more information about the TextMergeParagraph rule later on in this topic, for now, just keep in mind that the TextMergeParagraph rule affects a single FAP file while the LoadCordFAP option affects all FAP files.

Since, in some cases, you must load FAP files, the system includes utilities which let you pre-compile FAP files and FXR files. By pre-compiling these files into CFA (FAP) and CFX (FXR) files, you can speed performance by eliminating parsing operations. The system is set up to use pre-compiled FAP and FXR files. You can see this setting below:

< RunMode >
CompiledFAP = Yes

To turn off this setting, change the Yes to No. We recommend you leave the setting set to Yes.

Avoid underlining variable field data

Underlining variable fields slows batch processing performance. This option, which you set via Studio’s Manage, Settings option, requires that either the DownloadFAP or LoadCordFAP INI option be set to Yes in the RunMode control group.

Pre-compile FAP and FXR files

As mentioned in the previous topic, you can pre-compile your FAP and font cross reference files (FXR) into CFA and CFX files. This improves performance. The system includes several utilities which you can use for this purpose.

Use

To convert

FAP2CFA

A single FAP file into a compiled FAP file. For more information see the Utilities Reference.

FDT2CFA

All of the FAP files that make up the form into compiled FAP files. For more information see the Utilities Reference.

CFA2FAP

A CFA file into a FAP file. Use for testing purposes. For more information see the Utilities Reference.

Note   The version of the system you use to compile the FAP and FXR files must be the same version you will use when running Documaker Server. Furthermore, the platforms must also match. For instance, if you compile the FAP and FXR files on version 11.0 for Windows, to use them in Documaker Server (GenTrn, GenData, GenPrint), you must run version 11.0 for Windows of Documaker Server.

Make sure the CompiledFAP option is set to Yes (the default) in the RunMode control group of your INI files before you run the system using precompiled FAP files.

In addition, use the File, Library Setup option (or edit your INI files) to specify the path for the CompLib, which is where the system will look for the compiled files. In your INI files, you will find this setting in the following control group:

< MasterResource >
CompLib = (directory the CFA and CFX files are stored in)

For MVS systems, you can specify a DD name, such as DD:COMPLIB()

Note   If you are going to use pre-compiled FAP files, you must also use precompiled FXR files.

Use overlays

The GenPrint program merges static data with the data in the NA file. Static data can come from FAP files or from overlay files. FAP files contain some information, such as updating information, which is not needed by the GenPrint program.

FAP files are larger than overlays and the system must also parse these files. Therefore, it’s more efficient to compile FAP files into overlays and tell the GenPrint program to use overlays instead of FAP files. You do this for AFP and PCL printers by setting the DownloadFAP and SendOverlays INI options as shown below:

< RunMode >
DownloadFAP = No
< PrtType:XXX >
SendOverlays = Yes

For Xerox Metacode printers, set the CompileInStream INI option to No. For Metacode printers, the SendOverlays option has no affect. The time you save on one FAP may not be significant, but the time saved on all FAP files will be.

Use the TextMergeParagraph rule only as necessary

When you define a text area with embedded variable fields in a FAP file, the text paragraph must be loaded as template data at runtime and then merged with data derived from the field level rules. The resulting text is re-wrapped and reformatted, based on the design of the FAP file. The text is then unloaded into the form data output stream. The TextMergeParagraph rule supports this capability.

This section-level rule checks to see if the FAP data for the section is loaded, and if not, it loads it. As field rules execute, the data is propagated into the text area, which causes the text to be reformatted. The section is flagged in memory as in-line so it will be treated as a template, instead of a static section. Even if the DownloadFAP option is set to No in the INI file, the GenPrint program will unload its resultant FAP data into the data stream as dynamic content instead of its precompiled overlay.

Although the system warns you if this rule is used in a normal static section which does not contain text areas, it is up to you to heed the warning and make the correction. Some users ignore warnings and only look at errors.

When you use this rule in a FAP file which contains the text area, the system unloads the entire FAP file, except for version records, into the NAFILE.DAT file. This occurs even if there are no embedded variable in the text area.

The static data in the FAP files does not have to be written into the NAFILE.DAT file. The less data the GenData program has to write to the NAFILE.DAT file, the faster it will run. Performance is affected because the NAFILE.DAT file is an input file for the GenData, GenPrint, and GenArc programs. The longer it takes these programs to read the NAFILE, the slower performance. Furthermore, if your NAFILE.DAT file is large, your archive file will also be large, which again affects performance.

For the best performance, avoid including other objects in the text area when you use this rule. This will minimize what the system has to unload into the NAFILE.DAT file.

For more information on this rule, see the Rules Reference.